package com.sy.olddriver.constant;

import java.io.File;

public class AppConstant {
    /**
     * 上下文中用于存放路径和方法映射信息对象的key
     */
    public static final String URL_MAPPINGS = "URL_MAPPINGS";

    /**
     * 重定向前缀
     */
    public static final String REDIRECT_PREFIX = "redirect:";

    /**
     * 上传后文件的保存路径
     */
    public static final String UPLOAD_FILE_DIR = "D:" + File.separator + "imgs" + File.separator;

    /**
     * 短信验证码在session中的属性名
     */
    public static final String SESSION_MESSAGE_VALIDATE_CODE = "session_message_validate_code";
    /**
     * 登录用户在redis中key的前缀
     */
    public static final String REDIS_USER_KEY_PREFIX = "user";
    /**
     * Cookie中用来保存用户的token的name
     */
    public static final String COOKIE_USER_TOKEN_NAME = "token";
    /**
     * Redis中存储分类信息的key
     */
    public static final String REDIS_CATEGORY_KEY = "categoties_cache";

    /**
     * 最新商品的展示条数
     */
    public static final Integer NEWEST_SHOPPING_SHOW_COUNT = 10;

    /**
     * 热门商品的展示条数
     */
    public static final Integer HOTEST_SHOPPING_SHOW_COUNT = 10;


    /**
     * 搜索页面一页显示的条数
     */
    public static final Long GOODS_LIST_PAGE_SIZE = 80L;

    /**
     * Cookie中用来保存用户临时的浏览记录的name
     */
    public static final String COOKIE_TEMP_HISTORY = "temp_history";

    /**
     * Redis中用来保存历史记录的key的前缀
     */
    public static final String REDIS_HISTORY_KEY_PREFIX = "history";

    /**
     * Cookie中用于保存临时购物车信息的name
     */
    public static final String COOKIE_TEMP_CART = "temp_cart";

    /**
     * Redis中用于保存临时购物车的key的前缀
     */
    public static final String REDIS_TEMP_CART_KEY_PREFIX = "temp_cart";

    /**
     * REDIS中用于保存登录用户的购物车的key的前缀
     */
    public static final String REDIS_USER_CART_KEY_PREFIX = "user_cart";

    /**
     * REDIS中用于保存订单自增序列的key
     */
    public static final String REDIS_ORDER_SEQUENCE="ORDER_SEQUENCE";
}
